﻿<UserControl x:Class="Hisaab.Client.Modules.Core.Account.View.AccountSideBar"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" mc:Ignorable="d"
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <ListView ItemsSource="{Binding Path=AccountTotals}" Background="{x:Null}" >
            <ListView.ItemContainerStyle>
                <Style TargetType="{x:Type ListViewItem}">
                    <Style.Triggers>
                        <Trigger Property="IsSelected"
                                         Value="True">
                            <Setter Property="Background"
                                                Value="{x:Null}" />
                            <Setter Property="BorderBrush"
                                                Value="{x:Null}" />
                        </Trigger>
                    </Style.Triggers>
                </Style>
            </ListView.ItemContainerStyle>

            <ListView.ItemTemplate>
                <DataTemplate>
                    <Grid Margin="0 3 0 3">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="20" />
                            <ColumnDefinition />
                            <ColumnDefinition Width="Auto"/>
                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Column="1" Text="{Binding Key.Name}" />
                        <TextBlock Grid.Column="2" Text="{Binding Value, StringFormat='{}{0:C}'}" HorizontalAlignment="Right" />
                    </Grid>
                </DataTemplate>
            </ListView.ItemTemplate>
        </ListView>
    </Grid>
</UserControl>